<div id="viewer-container"></div>
<script>
  CTS.ready(() => {
    let viewer = new CTS.Viewer('viewer-container') //初始化场景
    viewer.camera.position.set(40, 40, 40) //设置相机位置
    let floors = new CTS.Floors(viewer)
    floors.createReflector([100, 100])
    let model
    new CTS.ModelLoder(viewer).loadModelToScene('resources/model/robot1.gltf', _model => {
      model = _model
      model.startAnima()
      model.setScalc(0.2)

      function anima(i) {
        model.stopAnima() //开始动画之前先关闭之前播放的动画
        model.animaPlay(i, () => {
          anima(i)
        })
      }
      anima(0)
    })
  })
</script>
